<template>
    <div>
        <!-- 面包屑导航 -->
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>权限管理</el-breadcrumb-item>
            <el-breadcrumb-item>权限列表</el-breadcrumb-item>
        </el-breadcrumb>
        <!-- 卡片视图区域 -->
        <el-card>
            <el-table :data="rightsList" stripe border>
                <el-table-column type="index"></el-table-column>
                <el-table-column prop="authName" label="权限"></el-table-column>
                <el-table-column prop="path" label="路径"></el-table-column>
                <el-table-column prop="level" label="权限等级">
                    <template v-slot="scope">
                        <el-tag v-if="scope.row.level==0">一级</el-tag>
                        <el-tag type="success" v-else-if="scope.row.level==1">二级</el-tag>
                        <el-tag type="warning" v-else>三级</el-tag>
                    </template>
                    
                </el-table-column>
            </el-table>
        </el-card>
    </div>
</template>
<script>
export default {
    data() {
        return {
            rightsList:[
                {authName:'商品管理',id:'1',level:'0',path:'goods',pid:'0'},
                {authName:'订单管理',id:'2',level:'1',path:'orders',pid:'0'},
                {authName:'权限管理',id:'3',level:'2',path:'rights',pid:'0'},
                {authName:'商品列表',id:'4',level:'1',path:'goods',pid:'0'},
                {authName:'添加商品',id:'5',level:'2',path:'goods',pid:'0'},
                {authName:'订单列表',id:'6',level:'2',path:'orders',pid:'0'},
                {authName:'添加订单',id:'7',level:'0',path:'orders',pid:'0'},
                {authName:'用户列表',id:'8',level:'0',path:'users',pid:'0'}
            ]
        }
    },
    created() {

    },
    methods: {

    }
}
</script>
<style lang="less" scoped>

</style>